package com.sen.patterns.structural.bridge.ex1;

import junit.framework.TestCase;

public class Test extends TestCase {

	public void testCoffee() {
		// 中杯加奶
		Coffee mediumCoffee = new Medium(new MilkCoffee());
		mediumCoffee.pourCoffee();
		
		mediumCoffee.setCoffeeBehavior(new FragrantCoffee());
		mediumCoffee.pourCoffee();

		// 大杯加奶
		Coffee superSizeCoffee = new SuperSize(new FragrantCoffee());
		superSizeCoffee.pourCoffee();
		
		superSizeCoffee.setCoffeeBehavior(new MilkCoffee());
		superSizeCoffee.pourCoffee();

	}

}
